package org.project.api.Vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.project.pojo.monthInv;
import org.project.utils.ArraysUtils;

/**
 * @Auther: hzy
 * @Date: 2022/4/13 14:44
 * @Description: 商品库存
 */
@Data
public class monthInvVo {

    @ApiModelProperty(value = "月份")
    private Integer[] month;

    @ApiModelProperty(value = "商品库存")
    private Double[] inv;

    @ApiModelProperty(value = "商品平均库存")
    private Double[] avgInv;

    public monthInvVo(monthInv val) {
        this.month = ArraysUtils.processLineInt(val.getMonth().substring(1, val.getMonth().length() - 1).split(","));
        this.inv = ArraysUtils.processLine(val.getInv().substring(1, val.getInv().length() - 1).split(","));
        this.avgInv = ArraysUtils.processLine(val.getAvgInv().substring(1, val.getAvgInv().length() - 1).split(","));
    }
}
